VtPulldown


Create a PullDown menu

Syntax

VtPulldown object_name [options]

Description

Creates a Pulldown menu. Returns the widget name. (Label resources can be used to title the menu.)

Options

-cascadeButton (G)
This flag can be used only with VtGetValues. It returns the widget name of the Pulldown menu's CascadeButton. Use this widget to set options such as -font.

-radioBehavior boolean (CS)
Specify that the Pulldown menu should act like a RadioBox.

Example

The following code produces a cascade menu within a Pulldown menu. The code creates a menu Food containing the button Fruit, which cascades to another menu that contains the buttons apple, banana, and kumquat.

set app [VtOpen "VtPulldown Demo"]
set form [VtForm $app.form]

set menubar [VtMenuBar $form.menubar]
   set food [VtPulldown $menubar.food -label "Food"]
   set fruit [VtPulldown $food.fruit -label "Fruit"]

        set apple [VtPushButton $fruit.apple -label "apple"]
        set banana [VtPushButton $fruit.banana  -label "banana"]
        set kumquat [VtPushButton $fruit.kumquat  -label "kumquat"]

VtShowDialog $app.form
VtMainLoop

This code produces the following:

See also: